# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kamera
pkgver=23.08.4
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/graphics"
pkgdesc="KDE integration for gphoto2 cameras"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kcmutils5-dev
	kconfig5-dev
	kconfigwidgets5-dev
	kdoctools5-dev
	ki18n5-dev
	kio5-dev
	kxmlgui5-dev
	libgphoto2-dev
	qt5-qtbase-dev
	samurai
	"
_repo_url="https://invent.kde.org/graphics/kamera.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kamera-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
99a9d0b85642f2e8d571e0c58e06e4c5647b724939f31a248aa5adc7763c9f517d106e54e8b6d9de516e5911c50c7e39b7cc88cf0dc490ddcabef36a33695d18  kamera-23.08.4.tar.xz
"
